package com.mrzhou.job.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.mrzhou.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 定时器任务实体类
 * @author qiang.zhou
 */
@Getter
@Setter
@TableName("cloud_quartz_scheduler_job")
public class SchedulerJob extends BaseEntity {

    private static final long serialVersionUID = 1L;

    public final String JOB_PARAM_KEY = "job_param_key";

    @ApiModelProperty("定时器名称")
    private String jobName;

    @ApiModelProperty(value = "cron表达式")
    private String cronExpression;

    @ApiModelProperty(value = "需要执行的定时器任务类，需继承QuartzJobBean.class")
    private String jobClass;

    @ApiModelProperty(value = "定时器状态, 1暂停")
    private Integer status;


    /**
     * 获取jobId 这里直接使用主键id做为JobId
     * @return
     */
    public Long getJobId() {
        return super.getId();
    }

}
